package com.inossem.warehousemanage_tv.bean;

import android.support.annotation.NonNull;

import java.util.List;

/**
 * 货架
 *
 * @author 詹建宇
 * @time on 2019/2/14 10:53
 * @email jianyu.zhan@inossem.com
 */
public class ShelvesBean {

    /**
     * factory_id : 111
     * location_id : 111
     * wh_id : 111
     * shelves_list : [{"index":"0","area_id":"001","area_code":"111","area_name":"111存储区","position_index1":"001"},{"index":"1","area_id":"001","area_code":"111","area_name":"111存储区","position_index1":"001"}]
     */

    private String location_id;
    private List<ShelvesListBean> shelves_list;

    public String getLocation_id() {
        return location_id;
    }

    public void setLocation_id(String location_id) {
        this.location_id = location_id;
    }

    public List<ShelvesListBean> getShelves_list() {
        return shelves_list;
    }

    public void setShelves_list(List<ShelvesListBean> shelves_list) {
        this.shelves_list = shelves_list;
    }

    public static class ShelvesListBean implements Comparable {
        /**
         * index : 0
         * area_id : 001
         * area_code : 111
         * area_name : 111存储区
         * position_index1 : 001
         */

        private String index;
        private String area_id;
        private String area_code;
        private String area_name;
        private String position_index1;
        private String is_temporar_area;
        private String is_click;

        public String getIs_temporar_area() {
            return is_temporar_area;
        }

        public void setIs_temporar_area(String is_temporar_area) {
            this.is_temporar_area = is_temporar_area;
        }

        public String getIs_click() {
            return is_click;
        }

        public void setIs_click(String is_click) {
            this.is_click = is_click;
        }

        public String getIndex() {
            return index;
        }

        public void setIndex(String index) {
            this.index = index;
        }

        public String getArea_id() {
            return area_id;
        }

        public void setArea_id(String area_id) {
            this.area_id = area_id;
        }

        public String getArea_code() {
            return area_code;
        }

        public void setArea_code(String area_code) {
            this.area_code = area_code;
        }

        public String getArea_name() {
            return area_name;
        }

        public void setArea_name(String area_name) {
            this.area_name = area_name;
        }

        public String getPosition_index1() {
            return position_index1;
        }

        public void setPosition_index1(String position_index1) {
            this.position_index1 = position_index1;
        }

        @Override
        public int compareTo(@NonNull Object o) {
            if (o instanceof ShelvesListBean){
                ShelvesListBean  bean = (ShelvesListBean) o;
                return this.index.compareTo(bean.getIndex());
            }
            throw new ClassCastException("不能转换为 [ShelvesListBean] 类型的对象");
        }
    }
}
